
IotDevice = require("../sdk/iot_device.js")
var device = new IotDevice();

device.on("online", function () {
    console.log("device is online")
    device.disconnect()
})
device.on("offline", function () {
    console.log("device is offline")
})
device.on("error", function(err){
    self.emit("error", err)
})

device.connect()